
const { request } = require('./https.js');

module.exports={
  // 登录
  loginApi: (data) => {
    let url = 'app/smslogin'
    let method = 'POST';
    return request({ url, method, data })
  },
  // 获取商品
  getMallListApi: (data) => {
    let url = 'mallProduct/list'
    let method = 'GET';
    return request({url, method, data})
  },
  // 六爻结果
  getLiuyaoResultApi: (data) => {
    let url = 'app/getLiuYao'
    let method = 'GET';
    return request({url, method, data})
  },
  // 64卦六爻结果
  getGuayaoResultApi: (data) => {
    let url = 'app/getGuaYao'
    let method = 'GET';
    return request({url, method, data})
  },
  // 老黄历
  getYellowCalendarApi: (data) => {
    let url = `app/yellowCalendar/v1/getYellowCalendar`;
    let method = 'GET';
    return request({ url, method, data })
  },
  getMonthYiApi: (data) => {
    let url = `app/yellowCalendar/v1/monthYiJi/`;
    let method = 'GET';
    return request({ url, method, data })
  },
  // 获取短信验证码
  getSmsCodeApi: (data) => {
    let url = `app/getsmscode?phone=${data}`
    let method = 'POST';
    return request({ url, method })
  },
  // 修改用户信息
  uploadUserApi: (data) => {
    let url = `app/edit`
    let method = 'GET';
    console.log(data, 'data')
    return request({ url, method, data })
  },
  logoutApi: () => {
    let url = 'logout'
    let method = 'POST';
    return request({ url, method })
  },
  getHolidayListApi: () => {
    let url = 'app/holidays/listTree'
    let method = 'GET';
    return request({ url, method })
  },
  // 获取商品类别
  getChannelShopTypeApi: (data) => {
    let url = 'system/dict/data/type/holiday_type'
    let method = 'GET';
    return request({ url, method, data })
  },
  // 获取广告类别
  getChannelAdTypeApi: (data) => {
    let url = 'system/dict/data/type/calendar_ad_position'
    let method = 'GET';
    return request({ url, method, data })
  },
  // 专属
  getExclusiveApi: (data) => {
    let url = 'app/yellowCalendar/v1/owner/'
    let method = 'GET';
    return request({ url, method, data })
  },
  //广告列表
  getAdListApi: (data) => {
    let url = 'app/calendarAds/list'
    let method = 'GET';
    return request({ url, method, data })
  },
  // 获取微信用户信息
  getWxUserInfoApi: (data) => {
    let url = 'gzh/getWxUserInfo'
    return request({url, data})
  },
  // 获取公众号二维码
  getGzhCodeApi: (data) => {
    let url = 'gzhImg/selectByType'
    return request({url, data})
  },
  // 获取微信用户信息通过opoenid
  getWxUserInfoByopenIdApi: (data) => {
    let url = 'gzh/getWxUserInfoByopenId'
    return request({url, data})
  },
  // 根据渠道获取appid
  getAppIdByChannelApi: (data) => {
    let url = 'gzh/getGzhAppid'
    return request({url, data})
  },
  // 获取城市信息
  getAreaInfoApi: () => {
    let url = 'app/bazi/getProvinceCountry'
    let method = 'GET';
    return request({ url, method })
  },
  // 八字结果
  getBaziResultApi: (data) => {
    let url = 'app/bazi/baziPan'
    let method = 'GET';
    return request({ url, method, data })
  },
  // 获取流月
  getBaziLiuYueApi: (data) => {
    let url = 'app/bazi/getLiuYue'
    let method = 'GET';
    return request({ url, method, data })
  },
  // 获取流日
  getBaziLiuRiApi: (data) => {
    let url = 'app/bazi/getLiuRi'
    let method = 'GET';
    return request({ url, method, data })
  },
  // 获取神煞
  getShenshaApi: (data) => {
    let url = 'app/bazi/getShenSha'
    let method = 'POST';
    return request({ url, method, data })
  },
  //姓名测算
  getNameInfo: (data) => {
    let url = 'app/getPartialAnalysis'
    let method = 'GET';
    return request({ url, method ,data})
  }
}
